package com.wanmait.recruitment.mapper;

import com.wanmait.recruitment.pojo.Company;
import com.wanmait.recruitment.pojo.Tags;
import org.apache.ibatis.annotations.Param;import java.util.List;
import com.wanmait.recruitment.pojo.Stage;
import com.wanmait.recruitment.pojo.Userinfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CompanyMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Company record);

    List<Company> findByName(@Param("name") String name);
    Company findById(Integer id);

    void register(Company company);
    /**
     *  根据激活码查找用户
     * @param activeCode
     * @return
     */
    Company getUserByActiveCode(String activeCode);
    //查询公司信息
    List<Company> select();
    int insertSelective(Company record);
    List<Company> companySearchJudge(String searchInput);
    Company selectBycompanyName(String searchInput);
    /**
     *  更新用户
     * @param company
     */
    void update(Company company);
    Company selectFindByCompanyById(Integer id);
    Company selectByPrimaryKey(Integer id);

    int updateById(Company company);

    int updateByPrimaryKey(Company record);

    String checkUsername(@Param("usernames") String username);

    //登录
    Company login(@Param("email")String email,@Param("userpass") String userpass);
    //根据邮箱查找
    Company findByUsername(String email);
    //根据邮箱名修改密码
    int updateUserpass(@Param("email") String email, @Param("userpass") String userpass);

    List<Company> selectPage(@Param("cityId") Integer cityId,@Param("stageId") Integer stageId ,@Param("industryId") Integer industryId,@Param("companyName") String companyName);

    Company selectByIdAndEmail(@Param("email") String email,@Param("id")Integer id);

    //增加当天简历发布数量
    int insertNowJobCount(Integer id);
    //增加发布职位的数量
    int insertJobCount(Integer id);
    //每天凌晨清零
    int updateNowJobCount();
    //修改公司收到的简历数量
    void updateResumeCount(Integer id,Integer change);

    //后台查询公司信息
    List<Company>  selectFindAll(Integer cityId,Integer stageId,Integer industryId,String companyName);

    void delete(Integer id);

    void  batchDelete(String ids);

    Company FinAallCompany(Integer id);

    void updateauthable(Integer id);
    void updateOpened(Integer id);
    List<Tags> selectTags(Integer id);

    void updatepassword(String userpass,Integer id);
}